package com.example.service.impl;

import com.example.demodao.entity.TbItem;
import com.example.service.AbstractCart;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * 内部用户购物车
 * @author zhang
 */
@Slf4j
@Service(value = "InternalUserCart")
public class InternalUserCart extends AbstractCart {
    @Override  
    protected void processCouponPrice(long userId, TbItem item) {
        log.info("内部用户购物车:{}，方法用于计算商品折扣",userId);
        item.setCouponPrice(BigDecimal.ZERO);
    }  

    @Override  
    protected void processDeliveryPrice(long userId, TbItem item) {
        log.info("内部用户购物车:{}，方法用于计算运费。",userId);
        item.setDeliveryPrice(BigDecimal.ZERO);  
    }  
}  